﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EVEAPI.Account
{
	public class AccountStatus : APIbase
	{
		public DateTime PaidUntil { get; set; }
		public DateTime CreateDate { get; set; }
		public int LogonCount { get; set; }
		public int LogonMinutes { get; set; }

		public AccountStatus(string keyID, string vCode)
			: base(keyID, vCode, @"https://api.eveonline.com/account/AccountStatus.xml.aspx", true)
		{
		}

		protected override void LoadData()
		{
			PaidUntil = DateTime.Parse(_result["paidUntil"].InnerXml);
			CreateDate = DateTime.Parse(_result["createDate"].InnerXml);
			LogonCount = int.Parse(_result["logonCount"].InnerXml);
			LogonMinutes = int.Parse(_result["logonMinutes"].InnerXml);
		}

		public override bool Read()
		{
			return Refresh(new Hashtable());
		}
	}
}
